<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8" isErrorPage="true" %>
<%@ include file="/common/taglibs.inc.jsp"%>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/common/head.inc.jsp"%>
<title>Page Not Found. [error 404]</title>
<style type="text/css">
.reasons{
	line-height:2em;
}
</style>
</head>

<body>

<div class="wrapper">
	<h1>The page you requested is no longer here.<small>[error 404]</small></h1>
	<div id="internal_error">
		<form id="form" method="post" action="${webroot}/SysBugAction.do?method=reportPageError">
			<h2>Help us to help you ...</h2>
			<p>In order to improve our service, you can inform us that someone else has an incorrect link to our site.<br />
			We will do our best to notify them that this page has moved and ask them to update the link.</p>
			<input type="hidden" name="activenumber" value="">
			<input type="hidden" name="username" value="">
			<input type="hidden" name="Referring Site" value="">
			<input type="hidden" name="Page Requested" value="">
			<p style="margin-top:2em;">
			<input type="submit" class="button" id="btn_report" value="Report this broken link &gt;&gt;">
			</p>
		</form>
	</div>
</div>

<script type="text/javaScript">
(function(window){
	var win=window,
		attop=win.top==win,
		doc=win.document,
		ref=doc.referrer,
		refloc=parseLocation(ref),
		loc=win.location,
		url=doc.URL;
	
	if(ref==""){//type url from location
		if(attop){
			
		}else{
			
		}
	}else{//linked by other site
		if(attop){
			
		}else{
			
		}
	}
	document.getElementById("form").onsubmit=function(){
		alert('Thank you for letting us know!');
		document.getElementById("btn_report").disabled=true;
		return false;
	};
})(window);


function parseLocation(url){
	if((typeof url)!="string"||url==""){return null;}
	var urlExp=/^(http:|https:|file:)(?:\/\/)([^\/]*)([^?#]*)([^#]*)(.*)$/ig,
		hostExp=/^([^:]*)((:\d+)?)$/ig;
	var protocol="",
		host="",
		hostname="",
		port="",
		pathname="",
		search="",
		hash="";
	url.replace(urlExp,function(){
		var args=arguments;
		protocol=args[1];
		host=args[2];
		pathname=args[3];
		search=args[4];
		hash=args[5];
	});
	host.replace(hostExp,function(){
		var args=arguments;
		hostname=args[1];
		port=args[2].replace(":","");
	});
	return protocol?{
		protocol:protocol,
		host:host,
		hostname:hostname,
		port:port,
		pathname:pathname,
		search:search,
		hash:hash
	}:null;
}

</script>

</body>
</html>
